
cmake_minimum_required(VERSION 3.5.0)


set(CMAKE_CXX_STANDARD 17)

file(GLOB local_src *.cpp)
file(GLOB local_headers *.h)

set (imgui_src ${CMAKE_SOURCE_DIR}/_deps/imgui/backends/imgui_impl_opengl3.cpp)

add_library(fxcc_graph_opengl3  ${local_headers} ${local_src} ${imgui_src})


if(UNIX)
target_link_libraries(fxcc_graph_opengl3 PUBLIC GL)
endif()

if(WIN32)
target_link_libraries(fxcc_graph_opengl3 PUBLIC OpenGL32 glad)
endif()

target_link_libraries(fxcc_graph_opengl3 PRIVATE fxcc_core fxcc_graph_common fxcc_platform_glfw)
add_subdirectory(phong)
add_subdirectory(pbrx)
add_subdirectory(font)
add_subdirectory(ssao)
add_subdirectory(toon)


add_library(fxcc_graph_opengl3_interface INTERFACE)

target_link_libraries(fxcc_graph_opengl3_interface
    INTERFACE
    fxcc_graph_opengl3 
    fxcc_graph_opengl3_phong 
    fxcc_graph_opengl3_pbr 
    fxcc_graph_opengl3_font
    fxcc_graph_opengl3_ssao

)